/**
 * @Author: Bobby
 * @Date: 2022-02-15 13:14:17
 * @LastEditTime: 2022-03-24 11:30:14
 * @LastEditors: Bobby
 * @Description:
 * @FilePath: \wms-v2\src\ve\common\components\baseComs\form\uiInput.js
 * @CIMC-V2
 */
import { exInput, exSwitch, exSizeSelect, exTextarea, exValidateSelect, exInputNumber } from '@ve/common/components/extension'
import { translateTitle } from '@/utils/i18n'
export default {
  VERSION: '20220408',
  type: 'uiNumberInput',
  name: '数字输入',
  icon: 'billiards-line',
  svg: 'shuzishurukuang',
  //数据别名
  // dataName: 'uiNumberInput_data',
  //数据集合 表单 列表等等
  data: {
    requestData: {},
  },
  extension: {
    model: exInput('Model', 'numberInput_name'),
    label: exInput('标签', '数值输入'),
    //rule: exSwitch('验证', false),
    extendRule: exValidateSelect('', {}, []),
    // ...exDivider(0),
    minVal: exInputNumber('最小值', -100000000000000000000, -100000000000000000000, 100000000000000000000),
    maxVal: exInputNumber('最大值', 100000000000000000000, -100000000000000000000, 100000000000000000000),
    step: exInputNumber('步长', 1),
    precision: exInputNumber('小数位', 0),
    precisionConstant: exInput('小数位常量', '', '当输入的常量存在值时,覆盖"小数位"项配置的值'),
    controls: { ...exSwitch('控制按钮', true), isSuperior: true },
    anInteger: { ...exInput('整数倍', '', '控制组件值为表单内其他项的整数倍'), isSuperior: true },
    nullValueControl: { ...exSwitch('空值免控', false, '当倍数值为 空 或 0 时，是否不控制整数倍'), isSuperior: true },
    // ...exDivider(1),
    tooltip: { ...exTextarea('弹窗提示', '', '', 3), isSuperior: true },
    size: exSizeSelect('尺寸', 'mini'),
    placeholder: exInput('提示', translateTitle('Ve.elements.请输入')),
    width: { ...exInput('宽度', 'auto', '填写数字:单位px,auto:自动宽度'), isSuperior: true },
    labelWidth: { ...exInput('label宽度', 'auto', '填写数字:单位px,auto:自动宽度'), isSuperior: true },
    disabled: exSwitch('禁用', false),
    hidden: exSwitch('隐藏', false),
    defaultValue: exInputNumber('默认值', 0, -100000000000000000000, 100000000000000000000),
    ignoreClearValue: { ...exSwitch('忽略清空', false, '开启后清空表单会保留默认值'), isSuperior: true },
    enterSelect: {
      type: 'exModuleSelect',
      name: '回车选中',
      value: [],
      hasCheckbox: false,
      treeData: '$getPageModules',
      isSuperior: true,
    },
  },
  //交互
  interaction: [],
  //条件、逻辑指令
  logicInstruction: [],
}
